from rest_framework import serializers
from .models import CourseModel, CourseCategoryModel, ChapterModel, TeacherModel


# 展示所有的分类
class ShowCourseSerializer(serializers.ModelSerializer):
    class Meta:
        model = CourseCategoryModel
        fields = '__all__'


# 展示所有课程

class ShowCouSerializer(serializers.ModelSerializer):
    class Meta:
        model = CourseModel
        fields = '__all__'


# 课程
class CouSerializer(serializers.ModelSerializer):
    class Meta:
        model = CourseModel
        fields = '__all__'


# 章节序列化
class ChapterSerializer(serializers.ModelSerializer):
    class Meta:
        model = ChapterModel
        fields = '__all__'


# 教师序列化
class TeacherSerializer(serializers.ModelSerializer):
    class Meta:
        model = TeacherModel
        fields = '__all__'
